import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'

import '@/assets/iconfont/iconfont.css'

import 'swiper/swiper-bundle.css';

import 'swiper/swiper-bundle.js'


import VueRouter from 'vue-router';
Vue.use(VueRouter)
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function (location, onResolve, onReject) {
    if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
    return originalPush.call(this, location).catch(err => err)
}

// elementUI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

/*引入vant*/
import vant from 'vant'
import 'vant/lib/index.css'

/* axios 使用时用$http*/
import axios from 'axios'
Vue.prototype.$http = axios
/*引入mockjs*/
import '../mock/yjx/yjx-index.js' //yjx

/* */

Vue.config.productionTip = false
Vue.use(vant)
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')